feat(compute-providers): add AWS EC2 provider modules - #5343
Open
edersonbrilhante wants to merge 4 commits into
Open
feat(compute-providers): add AWS EC2 provider modules#5343edersonbrilhante wants to merge 4 commits into
edersonbrilhante wants to merge 4 commits into
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 3, 2026 20:14
bf422c7 to
9d01b81
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
3 times, most recently
from
September 3, 2026 21:51
6c1cb2e to
ef7ef08
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 4, 2026 17:59
ef7ef08 to
8375dad
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 7, 2026 15:00
8375dad to
938612c
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Bootstrap failures, incorrect CloudWatch permissions, and overly broad termination grants must be addressed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds the internal AWS EC2 compute-provider module and its provider contract.
Changes:
- Adds EC2 resources, IAM policies, validation, logging, and bootstrap configuration.
- Adds Linux, Windows, and macOS runner templates.
- Adds trust-policy support and Terraform tests.
File summaries
| File | Description |
|---|---|
modules/compute-providers/aws/ec2/versions.tf |
Defines provider requirements. |
modules/compute-providers/aws/ec2/variables.tf |
Defines module inputs. |
modules/compute-providers/aws/ec2/validations.tf |
Validates provider configuration. |
modules/compute-providers/aws/ec2/trust-policy/versions.tf |
Defines trust-module requirements. |
modules/compute-providers/aws/ec2/trust-policy/variables.tf |
Defines trust-policy input. |
modules/compute-providers/aws/ec2/trust-policy/validations.tf |
Validates additional policy JSON. |
modules/compute-providers/aws/ec2/trust-policy/tests/trust-policy.tftest.hcl |
Tests trust-policy behavior. |
modules/compute-providers/aws/ec2/trust-policy/README.md |
Documents the trust module. |
modules/compute-providers/aws/ec2/trust-policy/outputs.tf |
Exports the merged policy. |
modules/compute-providers/aws/ec2/trust-policy/assume-role.tf |
Builds EC2 trust policies. |
modules/compute-providers/aws/ec2/tests/provider.tftest.hcl |
Tests the provider contract. |
modules/compute-providers/aws/ec2/templates/user-data.sh |
Bootstraps Linux runners. |
modules/compute-providers/aws/ec2/templates/user-data.ps1 |
Bootstraps Windows runners. |
modules/compute-providers/aws/ec2/templates/user-data-osx.sh |
Bootstraps macOS runners. |
modules/compute-providers/aws/ec2/templates/start-runner.sh |
Starts Linux runners. |
modules/compute-providers/aws/ec2/templates/start-runner.ps1 |
Starts Windows runners. |
modules/compute-providers/aws/ec2/templates/start-runner-osx.sh |
Starts macOS runners. |
modules/compute-providers/aws/ec2/templates/install-runner.sh |
Installs Linux runner binaries. |
modules/compute-providers/aws/ec2/templates/install-runner.ps1 |
Installs Windows runner binaries. |
modules/compute-providers/aws/ec2/templates/install-runner-osx.sh |
Installs macOS runner binaries. |
modules/compute-providers/aws/ec2/templates/cloudwatch_config.json |
Defines CloudWatch collection. |
modules/compute-providers/aws/ec2/runner-instances.tf |
Creates EC2 runner resources. |
modules/compute-providers/aws/ec2/runner-config.tf |
Stores bootstrap configuration. |
modules/compute-providers/aws/ec2/README.md |
Documents the provider module. |
modules/compute-providers/aws/ec2/provider-contract.tf |
Assembles the provider contract. |
modules/compute-providers/aws/ec2/policies-runner.tf |
Defines runner permissions. |
modules/compute-providers/aws/ec2/outputs.tf |
Exports provider artifacts. |
modules/compute-providers/aws/ec2/logging.tf |
Creates logging resources. |
modules/compute-providers/aws/ec2/instance-profile.tf |
Creates the instance profile. |
modules/compute-providers/aws/ec2/control-plane.tf |
Defines control-plane integration. |
Review details
Suppressed comments (2)
modules/compute-providers/aws/ec2/templates/user-data.sh:40
- With the
-eshebang, a failed upgrade terminates user data at this command, so the retry branch is unreachable. Test the command as theifcondition instead.
dnf upgrade-minimal -y
modules/compute-providers/aws/ec2/control-plane.tf:115
- This standalone legacy-tag statement grants terminate and tag operations across all runner configurations; the later
ghr:environmentstatement is an alternative grant, not an additional restriction. Scope this statement by environment or remove it so one lane's scale-down role cannot modify runners belonging to another lane.
condition {
test = "StringEquals"
variable = "ec2:ResourceTag/ghr:Application"
values = ["github-action-runner"]
}
- Files reviewed: 30/30 changed files
- Comments generated: 11
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
2 times, most recently
from
September 8, 2026 14:47
8375d16 to
e49356c
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 8, 2026 15:16
e49356c to
c3be226
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 8, 2026 15:41
c3be226 to
0038ace
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 8, 2026 16:07
0038ace to
1cf71e5
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 8, 2026 16:11
1cf71e5 to
6d18372
Compare
edersonbrilhante
force-pushed
the
refactor-compute-provider-modules
branch
from
September 8, 2026 16:20
6d18372 to
a0f38f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the internal AWS EC2 compute-provider module and its trust-policy submodule. The provider owns EC2 runner instances, launch templates, networking, AMI selection, logging, bootstrap configuration, instance profiles, runner IAM policy fragments, and compute-provider validation.
The module exposes a typed provider contract for runner-config and orchestration consumers while keeping shared runner composition and orchestration outside the EC2 implementation.
Test Plan
Related Issues
Depends on #5342.